<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理 - 易买网</title>
<link type="text/css" rel="stylesheet" href="../css/style.css" />
<script type="text/javascript" src="../scripts/jquery-1.8.3.js"></script>
<script type="text/javascript" src="../scripts/function-manage.js"></script>
</head>
<body>
<div class="main">
	<h2>修改分类</h2>
	<div class="manage">
		<form action="../UpdCategoryServlet">
			<input type="hidden" value="${pc.epcid}" name="epcid" id="epcid"/>
			<input type="hidden" value="${pid}" id="pid"/>
			<table class="form">
				<tr>
					<td class="field">父分类：</td>
					<td>
						<select name="parentId" id="parentId">
							<c:forEach items="${list}" var="v">
								<option value="${v.epcid}">${v.epcname}</option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<tr>
					<td class="field">分类名称：</td>
					<td><input type="text" class="text" name="className" value="${pc.epcname}" /></td>
				</tr>
				<tr>
					<td></td>
					<td><label class="ui-blue"><input type="submit" value="更新" /></label></td>
				</tr>
			</table>
		</form>
	</div>
</div>
</body>
</html>
<script>
    $(function () {
        var pid = $("#pid").val();
        $("#parentId").find("option[value='"+pid+"']").attr("selected", "selected");
    });
</script>
